/**
 * 
 */
package com.david.cms.controller;

import java.io.IOException;
import java.io.OutputStream;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.imageio.ImageIO;
import javax.inject.Inject;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.david.basic.util.Captcha;
import com.david.cms.auth.AuthClass;
import com.david.cms.auth.AuthMethod;
import com.david.cms.model.Role;
import com.david.cms.model.RoleType;
import com.david.cms.model.User;
import com.david.cms.service.IUserService;

/**
 * @description   clean jetty:run
 * @author David
 * @version 2013-5-8
 */
@Controller
@AuthClass("login")
public class AdminController {
	@RequestMapping("/admin")
	@AuthMethod
	public String index(){
		return "admin/index";
	}
	@RequestMapping("/")
	public String front(){
		return "front/index";
	}
	@AuthMethod
	@RequestMapping("/admin/logout")
	public String logout(HttpSession session) {
		session.invalidate();
		return "redirect:/login";
	}
}

